// 菜单配置
// headerMenuConfig：头部导航配置
// asideMenuConfig：侧边导航配置

const headerMenuConfig = [
  {
    name: 'feedback',
    path: 'https://github.com/alibaba/ice',
    external: true,
    newWindow: true,
    icon: 'message',
  },
  {
    name: 'help',
    path: 'https://alibaba.github.io/ice',
    external: true,
    newWindow: true,
    icon: 'bangzhu',
  },
];

const asideMenuConfig = [
  {
    name: 'Dashboard',
    path: '/dashboard',
    icon: 'home2',
    children: [
      {
        name: '监控页',
        path: '/dashboard/monitor',
        authority: ['admin', 'user'],
      },
    ],
  },
  {
    name: '图表页',
    path: '/chart',
    icon: 'chart1',
    children: [
      {
        name: '基础图表',
        path: '/chart/basic',
        authority: ['admin', 'user'],
      },
      {
        name: '通用图表',
        path: '/chart/general',
        authority: ['admin'],
      },
    ],
  },
  {
    name: '表格页',
    path: '/table',
    icon: 'table',
    children: [
      {
        name: '基础表格',
        path: '/table/basic',
        authority: ['admin', 'user'],
      },
      {
        name: '通用表格',
        path: '/table/general',
        authority: ['admin', 'user'],
      },
      {
        name: '静态数据',
        path: '/table/reservation',
        authority: ['admin', 'user'],
      },
      {
        name: '我的项目',
        path: '/table/project',
        authority: ['admin', 'user'],
      },
      {
        name: '模版管理',
        path: '/table/templateMan',
        authority: ['admin', 'user'],
      },
      {
        name: '流程定义管理',
        path: '/table/processDefinition',
        authority: ['admin', 'user'],
      },
      {
        name: '流程任务管理',
        path: '/table/processTask',
        authority: ['admin', 'user'],
      },
      {
        name: '流程实例管理',
        path: '/table/processInstance',
        authority: ['admin', 'user'],
      },
      {
        name: '新建项目',
        path: '/table/project_create',
        authority: ['admin'],
        hideInMenu: true,
      },
    ],
  },
  {
    name: '列表页',
    path: '/list',
    icon: 'copy',
    children: [
      {
        name: '基础列表',
        path: '/list/basic',
        authority: ['admin'],
      },
      {
        name: '通用列表',
        path: '/list/general',
        authority: ['admin'],
      },
    ],
  },
  {
    name: '内容页',
    path: '/profile',
    icon: 'cascades',
    children: [
      {
        name: '基础详情页',
        path: '/profile/basic',
        authority: ['admin'],
      },
      {
        name: '条款协议页',
        path: '/profile/general',
        authority: ['admin'],
      },
    ],
  },
  {
    name: '结果页',
    path: '/result',
    icon: 'edit2',
    children: [
      {
        name: '成功',
        path: '/result/success',
        authority: ['admin'],
      },
      {
        name: '失败',
        path: '/result/fail',
        authority: ['admin'],
      },
    ],
  },
  {
    name: '个人页',
    path: '/account',
    icon: 'person',
    children: [
      {
        name: '个人设置',
        path: '/account/setting',
        authority: ['admin'],
      },
    ],
  },
  {
    name: '异常页',
    path: '/exception',
    icon: 'gaojingxinxi',
    children: [
      {
        name: '204',
        path: '/exception/204',
        authority: ['admin', 'user'],
      },
      {
        name: '403',
        path: '/exception/403',
        authority: ['admin', 'user'],
      },
      {
        name: '404',
        path: '/exception/404',
        authority: ['admin', 'user'],
      },
      {
        name: '500',
        path: '/exception/500',
        authority: ['admin', 'user'],
      },
    ],
  },
  {
    name: 'Icon图标',
    path: '/icon',
    icon: 'skin_light',
    children: [
      {
        name: '通用Icon',
        path: '/icon/basic',
        authority: ['admin'],
      },
    ],
  },
  {
    name: '状态管理',
    path: '/stateMan',
    icon: 'code',
    children: [
      {
        name: '加减计算',
        path: '/stateMan/calc',
        authority: ['admin'],
      },
    ],
  },
  {
    name: '系统管理',
    path: '/sysMangent',
    icon: 'repair',
    children: [
      {
        name: '角色管理',
        path: '/sysMangent/role',
        authority: ['admin'],
      },
    ],
  },
  {
    name: '多级菜单',
    path: '/multi',
    icon: 'ol-list',
    children: [
      {
        name: '二级菜单页',
        path: '/multi/pagetwo',
        authority: ['admin'],
      },
      {
        name: '二级菜单隐藏页',
        path: '/multi/pagetwo_info',
        authority: ['admin'],
        hideInMenu: true,
      },
      {
        name: '二级菜单',
        path: '/multi/menutwo',
        children: [
          {
            name: '三级菜单页',
            path: '/multi/menutwo/pagethird',
            authority: ['admin'],
          },
          {
            name: '三级菜单隐藏页',
            path: '/multi/menutwo/pagethird_info',
            authority: ['admin'],
            hideInMenu: true,
          },
        ],
      },
    ],
  },
  {
    name: '页面测试',
    path: '/pagetest',
    icon: 'home',
    children: [
      {
        name: '我的二级菜单',
        path: '/pagetest/two',
        authority: ['admin'],
      },
    ],
  },
];

export { headerMenuConfig, asideMenuConfig };
